<include file="Public:header" />
<h3 class="title"><em>列表</em><include file="nav" /></h3>
<div class="listbox">
  <form name="mform" method="post" action="{:U('index')}">
    <div class="search"> <span>名称：</span>
      <input name="name" type="text" id="name" class="ipt" size="30" value="{$pageInfo['name']}" />
      <select name="status" id="status" class="sel">
        <option value="">所有状态</option>
        <option value="1" style="color: #f30;">显示</option>
        <option value="2" style="color: #080;">不显示</option>
      </select>
      <script type="text/javascript">
			$(function(){
				$("#status").val("{$pageInfo['status']}");	
			});
			</script>
      <input type="submit" class="btn" value="搜索" />
    </div>
  </form>
  <form name="mform" method="post" action="{:U('doAction')}">
    <div class="toolbar">
      <select name="act" id="act" class="sel">
        <option value="delAll" style="color: #f00;">删除选定</option>
      </select>
      <input type="submit" class="btn" value="应用" onClick="if(IsCheck('id[]')==false){alert('请指定您要操作的ID！');return false;}else{return confirm('确认执行此操作吗？');}">
    </div>
    <table width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
        <th><input type="checkbox" id="ChkAll" onClick="CheckAll(this.form)">
          选择</th>
        <th width="460" align="left">广告位名称</th>
        <th width="150" align="center">广告类型</th>
        <th width="175">调用代码</th>
        <th width="126">状态</th>
        <th width="106">操作</th>
      </tr>
      <empty name="list">
        <tr>
          <td colspan="8">无任何数据！</td>
        </tr>
        <else/>
        <volist name="list" id="row">
          <tr>
            <td width="85" align="center"><input name="id[]" type="checkbox" value="{$row['id']}"></td>
            <td>{$row['name']}</td>
            <td align="center"><switch name="row['ad_type']">
                <case value="1">图片</case>
                <case value="2">轮播</case>
                <default />
                文本 </switch></td>
            <td width="175" align="center"><input type="text" class="ipt" size="15" value="{$row['get_code']|default='无'}" /></td>
            <td width="126" align="center"><eq name="row['status']" value='1'>显示
                <else />
                不显示</eq></td>
            <td width="106" align="center"><a href="{:U('edit', array('id'=>$row['id']))}">编辑</a> <gt name="row['id']" value="12">&nbsp;|&nbsp; <a href="{:U('del',array('id'=>$row['id']))}" onclick="return confirm('你确定删除吗?');">删除</a></gt></td>
          </tr>
        </volist>
      </empty>
    </table>
  </form>
  <include file="Public:page" /> </div>
<include file="Public:footer" />